package com.linchong.xshop.dao;

import com.linchong.xshop.entity.Shop;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author linchong
 * @desc 店铺dao层
 * @email littlexbear@163.com
 * @create 2018-06-11 19:43
 * @CopyRight(C) https://blog.csdn.net/littlexbear
 **/
public interface ShopDao {

    /**
     * 返回queryShopList总数
     * @param shopCondition
     * @return
     */
    int queryShopCount(@Param("shopCondition") Shop shopCondition);
    /**
     *
     * @param shopCondition  查询的条件
     * @param rowIndex  从那一页取数据
     * @param pageSize  返回的条数
     * @return
     */
    List<Shop> queryShopList(@Param("shopCondition") Shop shopCondition,
                             @Param("rowIndex") int rowIndex,@Param("pageSize") int pageSize);
    /**
     * 查询店铺信息
     * @param shopId
     * @return
     */
    Shop queryByShopId(Long shopId);
    /**
     * 新增店铺
     * @param shop
     * @return
     */
    int insertShop(Shop shop);

    /**
     * 更新店铺操作
     * @param shop
     * @return
     */
    int updateShop(Shop shop);




}
